<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let p = new Promise((res,rej)=>{
            res('苏凉');
        })
        let t = p.then((value)=>{
            //通过return可以将t这个promise对象的状态改为fulfilled，并且将return的值作为该promise对象的结果
            return "name:"+value;
        },(reason)=>{
            console.log("执行失败！");
        })
        t.then((value)=>{
            console.log(value);
        },(reason)=>{
            console.log(reason);
        })
        console.log(t);
    </script>
</body>
</html>